Ext.define('DCApp.view.book.List', {
    extend: 'Ext.grid.Panel',
    alias: 'widget.booklist',
    
    requires: [
        'DCApp.controller.ListController',
        'DCApp.view.book.ListModel'
    ],

    controller: 'list',
    plugins: ['gfilters'],
    viewModel: {
        type: 'booklist'
    },
    bind: {
        store: '{objs}'
    },
    header:false,
    title: 'Array Grid',

    selType: 'checkboxmodel',
    
    tbar: ['->',{
        text: '录入',
        handler: 'onNew'
    }],
	
	listeners: {
        itemdblclick: 'onDblClick'
    },
    
    columns: [
		{
            text     : '内容分类',
            dataIndex: 'className',
            filter: 'string'
        },
        {
            text     : '形式分类',
            dataIndex: 'objProdarea',
            filter: 'string'
        },
        {
            text     : '图书编号',
            dataIndex: 'objNo',
            filter: 'string'
        },
        {
            text     : '图书名称',
            dataIndex: 'objName',
            filter: 'string'
        },
        {
            text     : '出版日期',
            dataIndex: 'generateEra',
            filter: 'string'
        },
        {
            text     : '图书作者',
            dataIndex: 'objAuthor',
            filter: 'string'
        },
        {
            text     : '是否介绍故宫',
            dataIndex: 'iscollection',
            filter: {
            	type: 'list',
                options: DCApp.Cfg.OPTS.book_collectiontype
            }
        },
        {
            text     : '是否推荐',
            dataIndex: 'iscommend',
            filter: {
            	type: 'list',
                options: DCApp.Cfg.OPTS.book_commendtype
            }
        },
        {
            text     : '出版社',
            dataIndex: 'publishHouse',
            filter: 'string'
        },
        {
            text     : '相关文稿编号',
            dataIndex: 'reldocid',
            filter: 'number'
        }
    ],
    
    initComponent: function(){    	
    	 this.callParent();
    }
 });
